/*
 * 首页样式文件 - Home Page Styles
 * 包含首页的整体布局、背景、英雄区域等样式定义
 */

.homePage {
  min-height: 100vh;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.heroSection {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.heroBackground {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://iiiu-assets-images.oss-cn-beijing.aliyuncs.com/assets/home.png?Expires=1756339520&OSSAccessKeyId=TMP.3KtH5yADB6FBiLcodsY4PjZoRWiHAp7TX3bJSF8tsyY5b4bSveBbwYfjfMZyPLJJAWvoxb23EJfkPnsemai1fjLjnEWYF7&Signature=1sM%2FFMMLm5rEpUrbdJkXaq4IHoU%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter 0.3s ease;

  // 移除黑色遮罩
  // &::before {
  //   content: '';
  //   position: absolute;
  //   top: 0;
  //   left: 0;
  //   right: 0;
  //   bottom: 0;
  //   background: rgba(0, 0, 0, 0.3);
  //   animation: float 8s ease-in-out infinite;
  // }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  33% {
    transform: translateY(-15px) scale(1.02);
  }

  66% {
    transform: translateY(-25px) scale(0.98);
  }
}

.heroContent {
  text-align: center;
  z-index: 2;
  position: relative;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.subtitle {
    font-size: 28px;
    color: rgba(255, 255, 255, 95%);
    margin-top: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 10%);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/**
  * 大图下的内容区域
  */
.contentSection {
  padding: 20px 0; // 顶部间距，
  background: var(--bg-secondary); 
  min-height: 100vh;
  
  .container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
  }
  
  .mainContent {
    display: flex;
    gap: 30px; // 减少左右间距，从50px改为30px
    align-items: flex-start;
  }
  
  .articlesSection {
    flex: 1;
    min-width: 0; // 防止flex子项溢出
  }
  
.categoryTagsContainer {
  margin-bottom: 16px; /* 减小与文章的间距，从24px改为16px */
}
  
  .sidebar {
    flex-shrink: 0;
    width: 400px;
  }
}

.sectionTitle {
  text-align: center;
  margin-bottom: 80px;
  
  h2 {
    font-size: 42px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    
    &::after {
      content: '';
      position: absolute;
      bottom: -15px;
      left: 50%;
      transform: translateX(-50%);
      width: 80px;
      height: 4px;
      background: linear-gradient(90deg, #ec4899, #f472b6);
      border-radius: 2px;
    }
  }
  
  p {
    font-size: 18px;
    color: rgba(255, 255, 255, 80%);
    margin: 0;
  }
}

.categoryGrid {
  display: flex;
  gap: 20px;
  margin-top: 0; // 移除顶部间距，让博客分类更靠近顶部
  margin-bottom: 40px;
  height: 80px; // 固定高度，形成横条样式
}

.categoryCard {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  height: 100%;
  
  &:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    transform: translateY(-2px);
    border-radius: 16px;
    box-shadow: 0 5px 20px var(--shadow-color);
  }
  
  .categoryIcon {
    font-size: 32px;
    flex-shrink: 0;
  }
  
  .categoryContent {
    flex: 1;
    text-align: left;
    
    h3 {
      color: var(--text-primary);
      font-size: 16px;
      font-weight: 600;
      margin: 0 0 4px;
    }
    
    p {
      color: var(--text-secondary);
      font-size: 12px;
      margin: 0;
      line-height: 1.4;
    }
  }
}

.cardGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 18px;
}

// 该分类下没有文章
.emptyState {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  
  .emptyEmoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
  }
  
  .emptyText {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

// 响应式设计
@media (max-width: 1024px) {
  .contentSection {
    .container {
      padding: 0 30px;
    }
  }
  
  .cardGrid {
    gap: 30px;
  }
}

@media (max-width: 1200px) {
  .mainContent {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .heroContent {
    padding: 0 15px;
  }
  
  .subtitle {
    font-size: 20px;
    letter-spacing: 1px;
  }
  
  .contentSection {
    padding: 60px 0;
    
    .container {
      padding: 0 20px;
    }
  }
  
  .sectionTitle {
    margin-bottom: 50px;
    
    h2 {
      font-size: 32px;
    }
    
    p {
      font-size: 16px;
    }
  }
  
  .categoryGrid {
    flex-direction: column;
    height: auto;
    gap: 15px;
  }
  
  .categoryCard {
    height: 60px;
  }
  
  .cardGrid {
    grid-template-columns: 1fr; // 移动端单列
    gap: 20px;
  }
  
  .sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .subtitle {
    font-size: 16px;
    margin-top: 20px;
  }
  
  .sectionTitle {
    h2 {
      font-size: 28px;
    }
  }
}
